package Lambda.mydemo1;

public class Test2 {
    public static void main(String[] args) {
        method(
                () -> {
            System.out.println("我会游泳");
        });
    }
    public static void method(Swim swim){
        swim.swimming();
    }
}
interface Swim{
    public abstract void swimming();
}